UPDATE camRun, camProcessedExp, chipRun, rawExp
SET camRun.state = 'run'
WHERE
    camRun.cam_id = camProcessedExp.cam_id
    AND camRun.chip_id = chipRun.chip_id
    AND chipRun.exp_id = rawExp.exp_id
    AND camProcessedExp.fault != 0
