It becomes a lie the moment you no longer intend to keep the promise or the moment you break the promise.
You said you were going to do X but you didn't. That is a lie. No matter in what context.
You are held at gunpoint and forced to tell something you promised not to: You lied that you would keep that promise because you did not keep that promise.
The content doesn't matter, if you say something that is false, you lie. In the beginning it may not be lie because you intend to keep the promise, but once broken, it was a lie.