If, for any reason, the levy upon the collateral is discharged or released without a sale thereof, the attachment or execution creditor who has paid or deposited the amount of the secured debt shall have all the rights under such security agreement possessed by the secured party at the time of the levy. If the secured party thereof desires to be reinstated in the party's rights thereunder, the party may repay the money received by the party, with interest thereon at the rate borne by the secured debt for the time it has been held by the party, and demand the return of the security agreement, whereupon the party's rights thereunder shall revest in the party, and the attachment or execution creditor shall be entitled to the deposit made, or any part thereof remaining in the hands of the clerk, or any money returned to the clerk by the secured party.
Iowa Code § 626.38