Some of those keys have a "chip" in them that the car "reads" so that you can't steal the vehicle with a copy. That makes a replacement key cost around $60. I'm not sure if a malfunction would prevent you from actually turning the ignition or if it would just prevent the starting circuit from being completed. For all you know the guys at the dealership just wacked the mechanism with a rubber mallet to fix it. If you can read up on it so that you know what to do next time.