I did this just the other day:
Set speed to: (unit.speed/10)*(distance(leftMarkX,0,rightMarkX,0)/60)
Sets the speed to a formula that means the UNIT SPEED DIVIDED BY 10 IS THE DELTA TIME to travel the distance. So, if the unit's speed is 600, it will take 1 second to reach its destination (600/10=60). 300 will take 2 seconds, 1200 half a second etc.
Hope that helps!
EDIT: Actually sorry, this is a little different, I wanted them to always take the same time to travel between points regardless of distance. Sorry for that, maybe you can still get some understanding from it though.