If the sale is made, the proceeds must be applied in the following order: First, to the amount of the homestead exemption, to be paid to the judgment debtor; second, up to the amount of the execution, to be applied to the satisfaction of the execution; third, the balance to be paid to the judgment debtor.