UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OO6ROPM1kE9Poo0j41sB2cz09776r3UfB9JGzbV2AKw='
WHERE
key_id = 'c67563b98cdf6cef8c79726546c38249c29a3803aefd74b7d9da728150c4e90c'
AND (
token = 'OO6ROPM1kE9Poo0j41sB2cz09776r3UfB9JGzbV2AKw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)