Either oil can be used in winter or summer without risk of damage.
The first number is the viscosity(thickness) of the oil at a lower temp, the lower the number the thinner it is, the 2nd number is the thickness at a higher temp.
Note that although it would appear from the number to get thicker as it gets hotter, it doesn't, just the odd ways the temps are measured different.
If you have a choice use 5W40, it will circulate a fraction better when cold, but 10W40 certainly won't kill it.
tabetha