Every mortgage given at the time of the purchase of real estate to secure the payment of the purchase money, whether such mortgage be given to the seller or to a third-party lender, shall be entitled to a preference over all judgments and other debts of the mortgagor, which preference shall extend only to the land purchased.