No bank chartered and doing business under the laws of this state shall issue bills payable or be liable on rediscounts at any time to a total amount in excess of three times its capital and surplus. However, this limit may be exceeded by a bank with the consent and approval in writing, of the state comptroller. Any violation of this provision by a bank shall authorize the state comptroller to deal with it as a bank being operated in violation of the laws, provided, however, that this section shall in no wise impair any obligation of banks for payment of loans and rediscounts in excess of the limit herein provided, nor shall any bank owing money heretofore borrowed in excess of this limit be held to be acting in violation of the law as to such existing loans.