UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FWuVZkx/1JwLJjhqzdPi7vOh1QlfvUS5kcjUrmrwFaM='
WHERE
key_id = '9bbf97e998cd949adcdc7e788d637dfd0e1b79e1f40ccb9eed2a72898f081924'
AND (
token = 'FWuVZkx/1JwLJjhqzdPi7vOh1QlfvUS5kcjUrmrwFaM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)