The strength t′ of the next-nearest-neighbor (NNN) hopping in most realized square optical lattices is much smaller than that of the nearest-neighbor hopping, and is usually seen as zero. Recently, both experimental and theoretical works have shown that the magnitude of the NNN hopping can be tuned in a wide range by shaking the optical lattice. In this paper, we study the effect of the real NNN term on topological phase transitions of the cold fermi gases in a two-dimensional square anisotropic optical lattice. We investigate the gapless condition of the system and the topological phase symbolized by the TKNN number. For the real NNN hopping, there exists a critical point tc′ as a function of μ, when 0<t′<tc′, there are only non-Abelian topological phases which are indicted by an odd TKNN number, and when t′>tc′ , the Abelian topological phase appears and the zone of the phase will be widened with the increase of t′. By numerically diagonalizing the Hamiltonian in the real space, the corresponding edge states for different topological phase and Majorana zero modes are discussed.