UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '80L1mKN+99Arm9fUXMW6PYgHMpV3hT9uxQWCnpYONFs='
WHERE
key_id = 'adc274b5dc5ad7b7e9189ab33d46a6f89c4a4a979631465b0971b4d4ce333376'
AND (
token = '80L1mKN+99Arm9fUXMW6PYgHMpV3hT9uxQWCnpYONFs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)