It first appears in Classroom 5-A during Chapter 1, where it changes positions in the classroom when the player enters one of the room's two entrances, which are separated from the inside by a large gaping hole in the floor. To obtain it, the player must position Seiko at one of the points where the key appears and then enter the room through the door across from the one the player had entered.
Tohko, Yuuya and Kai find the key in the lock of the locked Infirmary door. Kai decides to play with it, tossing it in the air, eventually, while in the staircase of the second floor, he doesn't catch it and loses it.
At the end of the chapter, Tohko while running away, stumbles across the key and uses it to enter the infirmary.
Significant plot details end here.
Tohko mentions that the infirmary door, despite being locked from the outside, doesn't have a lock on the inside.
It is safe to assume that Tohko had the key to the infirmary on her in Corpse Party: Blood Covered too.