The green key is found pretty late, halfway through the final dungeon, in a familiar-looking room that's hard to miss. There's a shortcut out of the dungeon in the same room.