Does motor oil get more viscous when heated & what is the meaning of the SAE motor oil code?
The numbers in the code have nothing to do with viscosity index. However, your understanding of 'W' for winter is correct. The real code for your car is actually SAE 5W-30 where SAE stands for the Society of Automotive Engineers, which has established a multi-grade numerical code system for grading motor oils according to their viscosity characteristics. I said viscosity characteristics, not viscosity index. According to Wikipedia:


  The original viscosity grades were all mono-grades, e.g., a typical engine oil was a SAE 30. This is because as all oils thin when heated, so to get the right film thickness at operating temperatures, oil manufacturers needed to start with a thick oil. This meant that in cold weather it would be difficult to start the engine as the oil was too thick to crank. However, oil additive technology was introduced that allowed oils to thin more slowly (i.e. to retain a higher viscosity index); this allowed selection of a thinner oil to start with, e.g., "SAE 15W-30", a product that acts like an SAE 15 at cold temperatures (15W for winter) and like an SAE 30 at $\pu{100 ^\circ C}$ ($\pu{212 ^\circ F}$).


viscosity characteristics: Kinematic viscosity is graded by measuring the time it takes for a standard amount of oil to flow through a standard orifice at standard temperatures. The longer it takes, the higher the viscosity and thus the higher the SAE code. Larger numbers in the code are thicker.

The company called Anton Paar has analyzed these SAE coded motor oil for the parameters, Kinematic viscosity and oil density versus elevating temperatures. I have included some of graphs including SAE 5W-40, but failed to find the most common SAE 5W-30:







Finally, for your information, Viscosity Index is a dimensionless number that represents how the viscosity of a hydraulic fluid changes with temperature. The greater the viscosity index, the smaller the change in fluid viscosity for a given change in temperature, and vice versa. Synthetic oils usually have a higher viscosity index than do mineral oils. (Mobile Hydraulic Tips). The following graph illustrate how viscosity index influence the change of viscosity with temperature (Ref.1):



It is also nice to know how change of viscosity index by modifiers affect mono-grade oil to better multi-grade oil:





References:


Tiago Cousseau, “Film Thickness and Friction in Grease Lubricated Contacts: Application to Rolling Bearing Toque Loss,”  PhD Thesis; University of Porto (Universidade do Porto), Porto, Portugal, 2013.