Based on your priorities, I'd get the x40.
I haven't tested the battery yet, but have heard that the claimed battery lives for the models are generally accurate, maybe a touch high. x31 about 5.5 hrs, x40 about 3.5 or 7.5 depending on which battery you get (the larger battery obviously adds weight). I almost always use powerports on flights, so battery is less important for me. You can always get a second battery, which should let you run through just about any flight.
I agonized a long time deciding between the x31 and x40. I ended up with the x31 because it should be a bit faster (note especially the current lack of larger or faster HDDs for the x40), 3.6 lbs seemed light enough given the limited amount of time I'm actually carrying it each day and I got it at a very good price. The x40 looks very appealing though.