UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ORI/7NnrxmRnncInjBkuI4qJndXudE+yckJuJUz7iIc='
WHERE
key_id = '5207d1abc798943d6b326cfd58c472c90e7b7ce7b2ab86aa79175ec967f6aac2'
AND (
token = 'ORI/7NnrxmRnncInjBkuI4qJndXudE+yckJuJUz7iIc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)