I had the same issue with my top case. I took it to the dealership and they first gave me a new key, because the Yamaha OEM key is soft and flexible. Second, the lock it self had rotated in the case backing. They forced it opened and adjusted the locks position.
One of my favorite quotes from a GS owner that I was talking to at a local 'bike night'. Me: "You ever take it off road." BMW owner: " ???HA...it would get dirty."
Needless to say that was the end of our conversation