Tools needed are a hand drill, 1/8" - 3/16" drill bit, study flat blade screw driver, center punch, hammer, pliers or vice grips. Most gumball machines use either a standard flat, double bit key or a tubular round key type of lock. Instructions for both are below. If you have a standard flat key type of lock, start by placing the gumball machine on a sturdy, clutter free work table.
Using a 1/4" or 3/16" drill bit, line up the drill bit with the outside edge of one side of the key slot. Drill a hole 1/4" deep straight into the slot. Do not over drill too deeply or you could damage the top. You should see metal and brass shavings emerge from the hole. The brass shavings need to remove. When done there should be a clean 1/4" deep hole in the lock slot.
Now stick the blade of a sturdy flat head screw driver into the drilled out key slot and twist counter clockwise to unscrew the lock. You may need to twist the screw driver back and forth initially to help break the lock free. Be careful not to remove so much that you damage the top.
Here the lock is out and the machine is ready for a new lock and key.