UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's2lc8v8Mv677M3ZusLDLdPUepOQGaETLheAUbgaoa2k='
WHERE
key_id = 'e7c75ca7d346b2494b0cfc62e40048aeda903ef3e232e61ede420d72ba2f7a73'
AND (
token = 's2lc8v8Mv677M3ZusLDLdPUepOQGaETLheAUbgaoa2k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)