UPDATE diffRun
    JOIN diffSkyfile USING(diff_id)
SET diffRun.state = 'update', 
    diffSkyfile.data_state = 'update'
    -- set hook %s
WHERE diff_id = %lld
    AND (diffRun.state = 'cleaned' OR diffRun.state = 'update')
    AND (diffSkyfile.data_state = 'cleaned')
