A box was a container used for transport or storage which was sometimes lockable.
The Neural native Nona called a phaser she stole from James T. Kirk a "small box" when threatening her guard. (TOS: "A Private Little War") Wu of Omega IV referred to them as fire boxes. (TOS: "The Omega Glory")
When James T. Kirk described to Spock where his brain was located after it had been removed from his head in 2269, he described it as "a black box tied in with light rays into a complex control panel." (TOS: "Spock's Brain")
Following the first contact with the Ferengi in 2364, William T. Riker from the USS Enterprise -D requested permission to beam a box of Chinese finger puzzles over to their ship, as a "thank you". (TNG: "The Last Outpost")
When Commander Bruce Maddox attempted to claim Data as the property of Starfleet in 2365, he claimed that "If it [Data] were a box on wheels I would not be facing this opposition." (TNG: "The Measure Of A Man")