UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zS6+P1CbNgyJ5R5wZMmkn0/Ol2cwFY4zf/7l1XxrpbE='
WHERE
key_id = '634c85f20fa741ca09f2acc7db99e938b69a6c4232d99ad19c410117ffa36087'
AND (
token = 'zS6+P1CbNgyJ5R5wZMmkn0/Ol2cwFY4zf/7l1XxrpbE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)