UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CkFDCdmMqlqjL9a1BA9AvDPKEu2kwdIcxmvmzHEwvWA='
WHERE
key_id = '837aa1b2add180708a77cbfb8915977607230b343fe75686c06a1b83caddcc53'
AND (
token = 'CkFDCdmMqlqjL9a1BA9AvDPKEu2kwdIcxmvmzHEwvWA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)