(a) such moneys were in excess of the amounts required by law; or
(b) the examination for which application was made and for which a fee was paid was denied. 3. Such refund shall, upon audit and warrant of the comptroller, be paid by the department out of any moneys in the custody of the department received pursuant to this article.