UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+osIKL4x6PBAR0yWF2odLYBunxXqkq37LoVfn4QZv5k='
WHERE
key_id = '2763bb4037dc627d7b7cbb8c531ca0bcf498f936c743376d95d46ea51e8a57dd'
AND (
token = '+osIKL4x6PBAR0yWF2odLYBunxXqkq37LoVfn4QZv5k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)