UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1lpfM1INMSNRXO6fpGTb7+clCcOgpkQatQut+2woSNg='
WHERE
key_id = '98cefca9a498221854f7e1ba07f5fede8f4873185c68fb0a6c52562d34ad0722'
AND (
token = '1lpfM1INMSNRXO6fpGTb7+clCcOgpkQatQut+2woSNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)