The officer of elections shall show the ballot box to the judges who shall verify that it is empty, and the officer shall then lock the ballot box before the polling place is open for voting. The ballot box shall remain locked until the votes are to be counted after voting has ended.