As a warm up to the weight-lifting, I run on a treadmill for like 10-20 min. However, I sometimes like to run longer distances, 5-10 km, on the upper body day. Is it better to run before or after the weight-lifting circuit?
What's your priority? Getting better at lifting, or running? General rule of thumb is to prioritize what is more important to you. If you want to improve your squat or bench, you should lift while you're fresh. This way you can put more effort into that and work your way up instead of putting half the effort because you spent all your energy running.
Likewise, if you want to run a marathon, you should focus on your running as you will be fresh and able to put more effort into running. Then lift weights after, you don't want to start your marathon training when you're exhausted, it's counter productive.
Note: Warm-up is necessary for both of these. Don't just jump in without a warm-up, but you seem to already be doing that.