Install a replacement toolbox lock by removing the old lock, inserting the new one in place and tightening it. Replacement locks are generally available in hardware, tool and home improvement stores.
Most locks must be unlocked for removal. If you have lost the key and the toolbox lock is locked, you may need to drill the cylinder out of the old lock. Once it is open, inspect the back of the lock to discover how it attaches to the toolbox. Some locks use screws, while others have a large nut that fits around the threading outside the cylinder. Use a screwdriver or pliers to remove the existing lock.
Purchase a lock that is similar to the one you removed from the toolbox. Place the new lock in the existing hole, and use the appropriate tools to secure it in place.
After installing the new lock, test it to ensure it locks the toolbox. Insert the key, and turn the lock. Attempt to lift the handle with the lock engaged. If lifting the handle opens the toolbox, you may need to adjust the locking mechanism so it latches. Once you are able to secure the toolbox, remove the key, and store it in a safe place.