(a) The voting machines shall remain locked against voting for the time provided by law for the filing of contests and then shall have the seal broken only on the order of the municipal governing body and if, in the opinion of such body, the contest has developed or is likely to develop, and shall remain locked until such times as ordered by the court hearing the contest or until a final determination thereof; provided, that on the order of any court of competent jurisdiction or on the order of the municipal governing body, the seal may be broken for the purpose of proper investigation. When such investigation is completed, the machine shall again be sealed and across the envelope containing the keys shall be written the signature of the person or persons having broken same; provided further, that in the event another election is held during the time for which the machines are required by this subsection to be locked and the machines are needed at such election, the municipal governing body shall be authorized to break the seal and make a record of the numbers on all counters on each machine and to remove all of the election records from the machine.
(b) The municipal governing body shall securely seal all records taken from a machine in an envelope or package and on the outside thereof label the package in such manner as to indicate plainly the machine from which they were removed and the month, day, and the year, of the election of which they are records. Each member of the municipal governing body present when the machines were opened shall certify to the accuracy of the records of the numbers on the counters and shall sign the envelope or package across the seal. This certificate and all other records removed from the voting machines shall be delivered to the municipal clerk and preserved by him for the same length of time prescribed in subsection (b) of Section 11-46-46 for the retention of paper ballots and then destroyed in the same manner that paper ballots are destroyed.