UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xY5KrOjX1llWg0U6V/8kN5NutoNCmDIXHZtcZ/2pcOM='
WHERE
key_id = '60e44b2f21f6be8919804aa31f7323ef823ec7926babc68bd8b4b7070f9cf61f'
AND (
token = 'xY5KrOjX1llWg0U6V/8kN5NutoNCmDIXHZtcZ/2pcOM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)