When the terms of office of the members of the board in any county affected by sections 40:20-2 to 40:20-19 of this title expire on any day other than at the annual stated meeting of the board the terms of office of such members are hereby extended to the annual stated meeting following the date when their terms would otherwise expire.