1. If I'm working on something vague, try to extract more information about it. It's very hard dealing with frequent changes on a complex code base. I'd try to find out who the stakeholders are, customer is, and most importantly, what they are trying to achieve that this serves.
2. Break it down into smaller tasks and measure myself against these. I want to leave work having completed something and not return to work knowing I didn't complete something.
3. Try bringing a colleague in to help you, such as talking through the existing code and bouncing ideas off them. The energy a colleague puts in can help with motivation.
4. Make sure there is an end to it and that it's not an open scope. You'll never finish something if the stakeholder doesn't know what they actually want.
5. If this looks like it's the norm and you're not happy, while you say you can't change jobs now, put the plan in motion for when you can. Think about your CV, learning new things, etc that help. When the time is right you want to be ready to jump.
6. Get enough sleep. I find I procrastinate more when I'm tired. Of course, eat healthily and exercise.
7. Try to remove other distractions, such as any other commitments at work as a 10 minute interruption can cost you an hour if you're not in the flow of the work.