UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SB+9LRGZ28wTUEN1V/nlfmeQ7cDH/GwysaEA8y0DKio='
WHERE
key_id = '19a577786e3c5984cc97eb74b8d60960a8fafd0eb206dda232d3f9b0e2c4c534'
AND (
token = 'SB+9LRGZ28wTUEN1V/nlfmeQ7cDH/GwysaEA8y0DKio='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)