When plaintiff recovers judgment, and the property attached in the suit was not sold as perishable property or discharged from the attachment, the court shall order the property to be sold to satisfy the plaintiff's demands. If execution is issued upon the judgment, the peace officer shall apply the property attached, including money or the proceeds from the sale of the property, upon the execution. If there is any of the property or proceeds remaining after satisfying the execution, the peace officer shall, upon demand, deliver the property or proceeds to the defendant.