INSERT INTO chipPendingImfile
    SELECT
        chipPendingExp.chip_id,
        rawImfile.class_id,
        rawImfile.uri
    FROM chipPendingExp
    JOIN rawImfile
        USING(exp_tag)
    WHERE
        rawImfile.fault = 0
        AND chipPendingExp.chip_id = LAST_INSERT_ID()
