An action to redeem a mortgage of real property, with or without an account of rents and profits, may be brought by the mortgagor or those claiming under him, against the mortgagee in possession, or those claiming under him, unless he or they have continuously maintained an adverse possession of the mortgaged premises for five years after breach of some condition of the mortgage.