The classical Prandtl-Batchelor theorem (Prandtl 1904;Batchelor 1956) states that in the regions of steady 2D flow where viscous forces are small and streamlines are closed, the vorticity is constant. In this paper, we extend this theorem to recirculating flows with quasi-periodic time dependence using ergodic and geometric analysis of Lagrangian dynamics. In particular, we show that 2D quasi-periodic viscous flows, in the limit of zero viscosity, cannot converge to recirculating inviscid flows with non-uniform vorticity distribution. A corollary of this result is that if the vorticity contours form a family of closed curves in a quasi-periodic viscous flow, then at the limit of zero viscosity, vorticity is constant in the area enclosed by those curves at all times.