UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qFRbgkUpaCxoUASLDpl90O6pAQOxrfCnvQE2oKCButY='
WHERE
key_id = '0d6934898a7714010c170a08ecf3e2684eeef2043812ef53a7e9cd51588492f6'
AND (
token = 'qFRbgkUpaCxoUASLDpl90O6pAQOxrfCnvQE2oKCButY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)