Notwithstanding any other provision of law, any payment by an insurance company, other than a life insurance company, of premium taxes levied by a county or municipality heretofore made which when made was not accompanied by a written protest of the legality or amount of such tax shall be deemed to have been a voluntary payment and shall not be recoverable from such county or municipality.