UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fcz+Qcssfivn++fDI16pwQA49S1klBqK1rNX4RNzgds='
WHERE
key_id = '4388391407d08cf6b37adca9cc6e253cc648b2c6905c741fb82b12e38faf9d4a'
AND (
token = 'Fcz+Qcssfivn++fDI16pwQA49S1klBqK1rNX4RNzgds='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)