Lynn (17-7) allowed just one hit over seven innings and struck out nine in the Cardinals' third consecutive win.
St. Louis maintained a lead of 3 1/2 games over the Dodgers and Brewers in the sprint for the second NL wild card berth.
Scott Moore drove in Houston's only run with a single in the second inning that cut the Cardinals' lead to 3-1.
Fernando Abad (0-6) remained winless for the Astros after giving up one run on a walk and two strikeouts in 1 2/3 innings. Abad departed the game in the second inning with a strained right oblique muscle.
'SNL': 'Anchorman 2' cast, One Direction sing 'Afternoon Delight' [VIDEO]
Selena Gomez drops F-bomb, walks off stage during Jingle Ball performance