Flax seeds are the richest plant source of lignans, which prevent the development of many diseases. Secoisolariciresinol diglucoside (SDG) is the predominant lignan in seeds of the cultivated species Linum usitatissimum. We sequenced transcriptomes of flax seeds at five developmental stages for 8 varieties differing in lignan content grown under three different conditions and evaluated the expression of PLR1 and UGT74S1 genes, which play a key role in SDG synthesis. The co-expression of PLR1 and UGT74S1 genes was detected, and the expression level of these genes was observed to change tens and hundreds of times during seed development, confirming their role in SDG synthesis in flax seeds. Low temperature (16 °С) and abundant watering resulted in a shift of the maximum expression level of both genes to later dates (14th day after flowering) compared to poor watering and high temperature (24 °С) and optimal conditions (20 °С) (7th day after flowering). Meanwhile, the expression level of PLR1 and UGT74S1 genes was lower under high temperature and poor watering than under optimal conditions. No association was found between lignan content in seeds of the studied flax varieties and the expression level of PLR1 and UGT74S1 genes. Our results provide important information on the contribution of genotype and environment to the expression of key genes of SDG synthesis, which is also necessary for the development of optimal approaches to obtain lignan-rich flax seeds.