Every official bond executed by an officer pursuant to law is in force and obligatory upon the principal and sureties therein for any and all breaches of the conditions thereof committed during the time the officer continues to discharge any of the duties of or hold the office, whether the breaches are committed or suffered by the principal officer, his deputy or clerk. When, except in criminal prosecutions, a penalty, forfeiture or liability is imposed on any officer for nonperformance or malperformance of official duty, the liability therefor attaches to the official bond of the officer, and to the principal and sureties thereon. Every such bond is in force and obligatory upon the principal and sureties therein for the faithful discharge of all duties which may be required of the officer by any law enacted subsequently to the execution of the bond, and such condition shall be expressed therein.