Lynn scattered four hits and did not walk a batter for his 15th win of the season, receiving a solo home run apiece in support from David Freese and Matt Holliday.
Yadier Molina drove in three on a pair of hits for the Cards, who remained three clear of the Pittsburgh Pirates with two games remaining.
The Pirates beat the Cincinnati Reds 4-1 on the back of a stellar performance from AJ Burnett to move within a game of of securing homefield advantage when the two meet again in the wildcard game.
Burnett threw eight innings of one-run ball in Cincinnati, striking out six and walking one, while Pedro Alvarez homered.
Meanwhile Kris Medlen hurled eight scoreless frames to help the Atlanta Braves keep pace with the Cards for the NL's best record by beating the Philadelphia Phillies 1-0.
Chris Johnson's solo shot in the eighth off the unfortunate Cliff Lee was the only run wither side could muster.
In the American League, the wildcard race tightened up as the Tampa Bay Rays lost 6-3 to the Toronto Blue Jays while Cleveland and Texas both won.
Ben Zobrist and Delmon Young both homered for the Blue Jays, allowing the Indians to pull level with Rays as they beat the Minnesota Twins 12-6.
Jason Kipnis had three hits, finishing a home run shy of the cycle, while all of the Indians batters had a hit.
Alex Rios and AJ Pierzynski had two RBI apiece as the Rangers beat the Los Angeles Angels 5-3, leaving them one game back in the wildcard race.
Daniel Nava, David Ortiz and Jonny Gomes the Boston Red Sox beat the Baltimore Orioles 12-3 to adge closer to securing the American League's best record.
The Oakland Athletics overcame the Seattle Mariners 8-2 to ensure the Red Sox would have to wait.
There were also wins for the Miami Marlins, the Milwaukee Brewers, the Kansas City Royals, the New York Yankees, the Washington Nationals, the Los Angeles Dodgers and the San Francisco Giants.