UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZnY6IS1Zxh4zg28nQ5+1BsRlUsd9cOvac9roVoRPhlY='
WHERE
key_id = 'fab5be2e9bde5691f0c7f50e16ba8a5c85ab1c98823dac0f266ff6a8587d0c3b'
AND (
token = 'ZnY6IS1Zxh4zg28nQ5+1BsRlUsd9cOvac9roVoRPhlY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)