UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Tvze6GqtWXuq/VV8Yi6IhxNuUO6rBqfTasrPCLG/SOM='
WHERE
key_id = '0491da1fd7da17d74e5b5ad8d2f59e52faba88f2ee23500bedbb6925c813c217'
AND (
token = 'Tvze6GqtWXuq/VV8Yi6IhxNuUO6rBqfTasrPCLG/SOM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)