I usually think of 3031 as a little fast for the 22-250 but with a 40gr bullet it's probably the best bet.
IMR lists the max load (36.3gr) velocity for 3031 under a 40gr pill as 4224fps.
They list 4895 (39gr compressed) at 4189fps and 4064 (38.5gr compressed) at 4187fps.
So 3031 will be a little more economical, faster, and you won't have to mess with compressed loads.
I couldn't speak to which one will be most accurate.