The entering of any judgment for the same debt, secured by any mortgage, shall not cause a sheriff's sale of the mortgaged premises, to destroy, or in any way affect the lien of such mortgage, nor shall the plaintiff, in such judgment, be entitled to any part of the proceeds of such sale: Provided always, That such sale has not been made under or by virtue of such judgment.
21 P.S. § 653