UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rrbsBMnkSHFFbyQWE0dlyOHpF2q+cuHrvwJqXQDYLUc='
WHERE
key_id = '256eec6f5a720a4f05121f8fd80a2c99c8a05c7d8f605fbb5c5f7fb9eda7e179'
AND (
token = 'rrbsBMnkSHFFbyQWE0dlyOHpF2q+cuHrvwJqXQDYLUc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)