The numbers 30 and 40 refer to the oil's viscosity at the engine's normal operating temperature, with 40 indicating a heavier viscosity at that operating temp. (about 100 deg. C).
The best oil viscosity depends on the seasonal temperatures.
If your car will be operated in colder temperatures, the 10W-40 may be heavier than ideal, but it won't hurt your engine appreciably.