UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tvsiePLY7f9f5HuiaJXmCQTWLITaWHVADMbJV9L/n/M='
WHERE
key_id = '1e6bdec5091e99ed7915e2156d1ac62105cf449aac004df97688d2e6d2a0fd8f'
AND (
token = 'tvsiePLY7f9f5HuiaJXmCQTWLITaWHVADMbJV9L/n/M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)