Starting pitchers are rarely allowed to face a lineup for the fourth time. Last season, a starting pitcher faced 30+ batters (three times through the lineup and at least the top three batters in the order for a fourth time) 104 times. That's out of 4,858 starts, or 4.3%.
Eleven full seasons have passed since a pitcher last faced 40 batters. That was CC Sabathia of the Brewers, who faced 40 Astros on August 18, 2008, throwing 130 pitches in Milwaukee's 9-3 win. (Indeed, only 29 pitchers have thrown 130+ pitches in those 11 years, with only three having topped 134 (and two of those games were no-hitters).