If any person asks to be excused from attending and testifying or from producing any books, papers, records, correspondence, or other documents at any hearing on the ground that the testimony or evidence required may tend to incriminate the person or subject the person to a penalty or forfeiture and the person is directed to give such testimony or produce such evidence, the person must comply with such direction but shall not thereafter be prosecuted or subjected to any penalty or forfeiture for or on account of any transaction, matter, or thing concerning which the person may testify or produce evidence and no testimony so given or evidence produced shall be received against the person upon any criminal action, investigation, or proceeding. No such person so testifying shall be exempt from prosecution or punishment for any perjury committed while so testifying, and the testimony or evidence so given or produced shall be admissible against the person in any criminal action, investigation, or proceeding concerning such perjury, nor shall the person be exempt from the refusal, revocation, or suspension of any license, permission, or authority conferred, or to be conferred, pursuant to the insurance laws of this state. Any such person may execute, acknowledge, and file in the office of the director a statement expressly waiving such immunity or privilege in respect to any transaction, matter, or thing specified in such statement, and thereupon the testimony of such person or such evidence in relation to such transaction, matter, or thing may be received or produced before any judge or justice, court, tribunal, grand jury, or otherwise, and if so received or produced such person shall not be entitled to any immunity or privilege on account of any testimony the person may so give or evidence so produced.