The rental assistance contract shall be limited to the term of the mortgage or 40 years from the date of the first payment made under the contract, whichever is the lesser.