The specific situation is as follows:
My warlock with War Caster has a bonfire from Create Bonfire the tile in front of them, and a hostile creature in the bonfire. On my warlock's turn, I successfully affect the hostile creature with Dissonant Whispers, provoking an opportunity attack through movement, satisfying War Caster's requirement.
Can I cast Lightning Lure, as my opportunity attack, once the creature has used 15 feet of movement, in order to attempt to proc damage from the creature leaving (upon being forced to move by Dissonant Whispers) and re-entering (upon being pulled by Lightning Lure) the tile with the bonfire?
Or, must I take my opportunity attack immediately upon its trigger, while the creature is still effectively 5 feet away?