Try closing the cap and squeezing the two small tabs that hold the lid closed onside the filler neck. They're the movable tabs on the bottom of the cap. That may release the key so you can pull it out of the lock. IIRC, it's a safety device so you can't start the bike and drive off with the cap open.