UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w/DUa2tqQpzeG5mgSAk4sbLMMzgWszNknWXky+Ihavg='
WHERE
key_id = '8cccc3c4fc1a235d7ffa03f9761d49c042b4bba212204b12a44cd5e259e270f3'
AND (
token = 'w/DUa2tqQpzeG5mgSAk4sbLMMzgWszNknWXky+Ihavg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)