Go to the room were you make the old man potion in year four, then go through the door to the right. In the room there is a gate with three locks on it, as well as the three keys. To get the keys, you will need Hermione, Griphook, and a Hufflepuff student (you can also use Dumbledore). To get the first key, go near the door where there's a picture with a man in it and wave to the picture with the Hufflepuff student or Dumbledore. Obtain the second key by making Griphook turn the key on the giant snake statue, which will move and drop the key out of its mouth. To get the third key, you need Hermione to copy the pattern on the bookshelf. Once you have put the keys into the gate, it will open and show some Lego bricks. Move the bricks to make stairs (going to the left). Once done, go up and walk to the far left to find an open chest with Professor Snapes character token.