UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yb09+eFordJfsHW/s08RBw+Ce95gCf76oLO0/VMn+08='
WHERE
key_id = 'b9ab3a2c65cc8a6a5c6dfaf6b29415bec4b3a4710179dd0255f0cf29f1b4dd42'
AND (
token = 'yb09+eFordJfsHW/s08RBw+Ce95gCf76oLO0/VMn+08='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)