UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Q5PqMovovEintRFrcr5qNQAj9KMmpiBYUdbxeggSpyY='
WHERE
key_id = 'ac6c2065f84c7b38082b455a5110b174c83bf3724c5feea0282acedee0eab73f'
AND (
token = 'Q5PqMovovEintRFrcr5qNQAj9KMmpiBYUdbxeggSpyY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)