UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gv3C73GaHoIYvCVVRT4UcjPQ2F381Cpg4YHxq/pLWe4='
WHERE
key_id = '94ba404c7dfcacb08bda550fff36a7cab0c8245b5085b844d45bc3f9ecab46b0'
AND (
token = 'gv3C73GaHoIYvCVVRT4UcjPQ2F381Cpg4YHxq/pLWe4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)