UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Wlf3O8jZ+Zp/eb2f0XNOUHIa7Gt/PtOCkZSfrZLJ9KQ='
WHERE
key_id = '604b46b7004f690c8e214b5ffeca8e7ab9998532b3a57426ad32a0a05ba16af4'
AND (
token = 'Wlf3O8jZ+Zp/eb2f0XNOUHIa7Gt/PtOCkZSfrZLJ9KQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)