If the engines clean, i'd just change it.
If the engines not clean and your wanting to clean it out a bit then you have a few options.
Simplest is to buy 2 or 3 gallons of cheap oil (10w40 from asda or whatever) and do two or three oil changes back to back, with maybe 100miles of driving between them, ensuing the engine gets up to temperature properly etc. Then change to your good 5w40 oil. The thinking here is the clean hot oil will dissolve a lot of the crap into it, then gets flushed out and changed before it has a chance to start redepositing itself on the insides. A good indicator of this is how quickly the oil turns black. On a clean petrol, it'll take a good few thousand miles to go dark. On my engine, i change it at 5k and the oil looks black by then, but when wiped on some white tissue you can clearly see its dark brown rather than black.
More agressive would be to use an oil flush, but i'm not sure i get the point of doing that on old used oil, ideally youd want to chagne it for cheap fresh oil, do the flush then change it again for good stuff.
Most agressively is what bradderz suggests, a 50:50 mix of diesel and clean engine oil. You'd put this in, run the engine for 10mins at fast idle, then drain and refill with good oil.
You can do some combination of all three if you like, diesel flush followed by a couple of rapid changes with clean cheap oil then switch to the good stuff or whatever.