UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eZ+LFyh832K2Qb9JudGkwgU3dKRQ3uKKp7q7bOU6s4c='
WHERE
key_id = '1a1a57b697dc85c596fdb6f2bd7e83a3614251c5ad597ef661d1f405b179e65c'
AND (
token = 'eZ+LFyh832K2Qb9JudGkwgU3dKRQ3uKKp7q7bOU6s4c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)