I got both of the keys but the second gate won't open, maybe I had to use them immediately when I got them?
Edit: turns out if you get the key to the left first, you can open both gates, and if you get the key to the right after getting the key to the left, you can only open 1 gate and are softlocked.