UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+ryDkpjDBPyR6UTq9QXXoB9cJTZaWmiYOt+rYnJq0do='
WHERE
key_id = '3562138d8f638b40ced6680b1a9beb67d92615536ce91588caaa7570cf7cfce2'
AND (
token = '+ryDkpjDBPyR6UTq9QXXoB9cJTZaWmiYOt+rYnJq0do='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)