No action or proceeding may be maintained by a person out of possession to cancel or enforce any contract for the sale or conveyance of real estate, after twenty years from the date of said contract, as shown by the record of such instrument, or after twenty years from the date of recording of any instrument which describes or refers to such contract, which itself is not of record, unless the record of such contract or other instrument shows that less than ten years have elapsed since the due date of the last payment on the indebtedness or part thereof, secured thereby, or since the claim for relief has accrued thereon, or unless the record shows an extension of the maturity of the instrument or of the debt or a part thereof, and that ten years from the expiration of the time of such extension has not yet expired. The limitation of this section may not be extended by the nonresidence of any plaintiff or defendant or of any vendor or vendee, nor by reason of any payment made after the due date of the last payment on the indebtedness or part thereof, nor by reason of any disability of any party interested in the contract.
N.D.C.C. § 28-01-42