Whatever lock you use, put it very high up so he cannot even reach it.
Is it really only the grahams he's eating? Is that the only thing? Then put them elsewhere; it's OK to hide them. Your daughter should be able to have them for her snack without his raiding them. If there is any other junk or sweet stuff iin there, stop buying it and show him that the pantry no longer has X or Y in it.
Finally, along with a lock that''s high up, and discipline, try putting an alarm on the door. You can buy cheap door alarms at Home Depot types of stores. These have two parts, one for the door frame and one for the door itself; when the door is shut, the alarm is off, but when the door opens and the two parts are separated, a loud alarm goes off. These can be stuck on and don't require hardware, drilling, etc. Do not tell him it's there. If he does defeat the lock, not only will you know it, he will get quite a startling experience. And yes, put it high up so he cannot mess with it either!