UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UnbEXduz0h3O8H0kci+HmlBObtQVQFLjkcbimb0VbCY='
WHERE
key_id = '03003e916a54d1455f76c7c76e5eccc76aab160adfe272aa7bd68b7ecbda6cf6'
AND (
token = 'UnbEXduz0h3O8H0kci+HmlBObtQVQFLjkcbimb0VbCY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)