UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tl9AFp9fhpdsPtRWLi/Wf0DeDV+7L1vZZ/w8mKa6hJs='
WHERE
key_id = '99e68fcc57e371b925a890fb6a0ed2aa2ea5755312686cd08db45e9f5f195fb8'
AND (
token = 'tl9AFp9fhpdsPtRWLi/Wf0DeDV+7L1vZZ/w8mKa6hJs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)