UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YFSNMJyEKd3FSmhIViVA8eg6piMF3pohHIXz3VJNwtU='
WHERE
key_id = '02033f15191bd9a5819b8fbba9d5ec74fc92f505121afcea5664684d672dab97'
AND (
token = 'YFSNMJyEKd3FSmhIViVA8eg6piMF3pohHIXz3VJNwtU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)