UPDATE chipRun
    JOIN chipProcessedImfile USING(chip_id)
SET chipRun.state = 'update', 
    chipProcessedImfile.data_state = 'update'
    -- set hook %s
WHERE chip_id = %lld
    AND (chipRun.state = 'cleaned' OR chipRun.state = 'update')
    AND (chipProcessedImfile.data_state = 'cleaned')
