The department may place under seal all drugs or devices that are owned by or in the possession, custody, or control of a licensee or permittee under the Pharmacy Practice Act at the time his or her license or permit is suspended or revoked or at the time the board or department refuses to renew his or her license or permit. Except as otherwise provided in this section, drugs or devices so sealed shall not be disposed of until appeal rights under the Administrative Procedure Act have expired or an appeal filed pursuant to the act has been determined. The court involved in an appeal filed pursuant to the Administrative Procedure Act may order the department during the pendency of the appeal to sell sealed drugs or devices that are perishable. The proceeds of such a sale shall be deposited with the court.