To replace a toolbox lock, first get a new lock, remove the old lock and inspect the condition of the toolbox before installing the new lock. Perform checks on the new lock to ensure it closes correctly.
Buy a new lock that has the same material and qualities as your toolbox. Get some screws or bolts and a screwdriver or a pair of pliers as well.
If your lock has been secured using screws, use a screwdriver to remove them. You may have to apply some force because the screws may be tightly fixed. For a toolbox with a lock that has been fixed using bolts, use a pair of pliers to unlock the bolts.
Empty the toolbox and inspect it for any rust, corrosion, damage or dirt. Clean it with a small brush and remove the debris. Replace screws as may be necessary to keep the toolbox in good condition.
Place the new lock on the toolbox and fix it using screws or bolts. Place the screws or bolts on each hole and join them to the holes in the toolbox. Secure and fasten them in place with a screwdriver or a pair of pliers.
Check whether the new lock is working correctly by trying to close it. Adjust the new lock as is necessary for it to close correctly.