Trigger to prevent update when Flag value is 1
CREATE TRIGGER dbo_Tmp_trg_AU
ON dbo.Tmp
AFTER UPDATE
AS
BEGIN
    SET ROWCOUNT 0;
    SET NOCOUNT ON;

    IF EXISTS
    (
        SELECT NULL
        FROM Deleted AS Del
        WHERE
            -- Originally, flag was 1
            Del.Flag = 1
            AND NOT EXISTS
            (
                -- Column(s) aside from Flag have changed
                SELECT
                    Del.[Type],
                    Del.TranDate
                INTERSECT
                SELECT
                    Ins.[Type],
                    Ins.TranDate
                FROM Inserted AS Ins
                WHERE
                    -- Same Id
                    Ins.Id = Del.Id
            )
    )
    BEGIN
        RAISERROR ('You can not update when Flag value is 1', 16, 1);
        ROLLBACK TRANSACTION;
        RETURN;
    END;
END;


This assumes the Id column cannot be updated (e.g. it is an IDENTITY column).