The third box, with a lock, is used for cardinals electors who are sick and perhaps cannot make it to the conclave. In that case, the sick cardinal places his vote inside the ballot box. Two authorized people, will take it to the Sistine Chapel, where it will be opened with this key.
These ballot boxes were made during the pontificate of John Paul II, and they actually follow the Apostolic Constitution 'Universi Dominici Gregis.' They were used in the 2005 conclave when Benedict XVI was elected. Now they will be used to elect the successor of St. Peter.