UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LFU9f723/1LLN/yhdWAKjIRmTptnWu1gdFzTuyF/MxI='
WHERE
key_id = '3ebf7e7330561da8e3e5f0efcf1a7f9dc45cda3d6e28c67cf9d02c068d908f7e'
AND (
token = 'LFU9f723/1LLN/yhdWAKjIRmTptnWu1gdFzTuyF/MxI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)