§ 311. Installment purchases. 1. No person who has received, or whose assignor has received, under a contract for the purchase of real or personal property, or of lease or bailment with a view to purchase of such property, a deposit or installment of the purchase price or a deposit or installment under the contract, lease or bailment from a person or from the assignor of a person who, after the date of payment of such deposit or installment, has entered military service, shall exercise any right or option under such contract to rescind or terminate the contract or resume possession of the property for nonpayment of any installment thereunder due or for any other breach of the terms thereof occurring prior to or during the period of such military service, except by action in a court of competent jurisdiction; provided, that nothing contained in this section shall prevent the modification, termination, or cancellation of any such contract, or prevent the repossession, retention, foreclosure, sale or taking possession of property purchased or received or which is security for any obligation under such contract, pursuant to a mutual agreement of the parties thereto, or their assignees, if such agreement is executed in writng subsequent to the making of such contract and during or after the period of military service of the person concerned.
2. Any person who shall knowingly resume possession of property which is the subject of this section otherwise than as provided in subdivision one hereof or attempt so to do, shall be guilty of a misdemeanor and shall be punished by imprisonment not to exceed one year, or by fine not to exceed one thousand dollars, or both.
3. Upon the hearing of such action the court may order the repayment of prior installments or deposits or any part thereof, as a condition of terminating the contract and resuming possession of the property, or may, in its discretion, on its own motion, and shall, except as provided in section three hundred and thirteen, on application to it by such person in military service or some person on his behalf, order a stay of proceedings as provided in this act except that such stay under this section may be ordered for the period of military service and six months thereafter or any part of such period, unless, in the opinion of the court, the ability of the defendant to comply with the terms of the contract is not materially affected by reason of such service; or it may make such other disposition of the case as may be equitable to conserve the interests of all parties.