Cadillac Repair Questions? Ask a Mechanic for Answers ASAP
It sounds like the transponder (the chip in your key) or the transducer (the receiver under the dash that picks up the signal from the key) malfunctioned. This could be due to the chip in the key dying -they have a small battery inside them that eventually dies and can't be replaced- or the transducer is dying- not nearly as common.
The first thing I would do is get your spare key if you have one and keep in on you in case it happens again. If it does, try the spare key. If it works fine with the spare then you know the other key is dying and will need to be replaced. If it doesn't work with the spare then the transducer is likely going bad (or the spare key is dying too-you'd need an automotive locksmith scan tool to be sure).
Also, do you have other vehicle keys on the key ring? Sometimes a key from another model of car will interfere with the security system by confusing it into thinking that the signal it is getting is wrong. If you have other automotive keys, try taking them off of the same key ring.
Lastly, it could have just been an electrical hiccup. This happens sometimes and there is really no explanation. Solar flares, CERN, errant radio signals, UFOs, electromagnetic pulse from North Korea, who knows? Sometimes the security module just acts up.