Wow, that's amazing! If you knew you were dreaming, then yes, it was a lucid dream. I had my first the other night and I had the opposite problem - I was trying not to wake up! You just need to remember that it's only a dream; everything is controlled by your own mind so you can manipulate it in any way you want.

One technique I've heard people talk about is dream spinning: spin your dream body round and round and imagine yourself ending up in a different place. This is supposed to be an effective way to escape from an undesirable situation, as well as keeping the dream vivid if it starts to fade. Hope that helps!