When a creditor holds any security for the creditor’s claim, the security shall be described in the claim. If the claim is secured by a mortgage, pledge or other lien which has been recorded, it shall be sufficient to describe the lien by date, and refer to the volume, page and place of recording. The claim shall be allowed in the amount remaining unpaid at the time of its allowance, and the judgment allowing it shall describe the security. Payment of the claim shall be upon the basis of the full amount thereof if the creditor shall surrender the creditor’s security; otherwise payment shall be upon the basis of one of the following:
 1. If the creditor shall exhaust the security before receiving payment, then upon the full amount of the claim allowed, less the amount realized upon exhausting the security.
 2. If the creditor shall not have exhausted, or shall not have the right to exhaust, the security, then upon the full amount of the claim allowed, less the value of the security determined by agreement, or as the court may direct.