I thought I'd post my current understanding as this topic seems to be discussed often.
Background:
http://mypercept.co.uk/articles/slw.htmhttp://mypercept.co.uk/articles/disproved_traditional_salat.htm(and associated links in the above two articles)
Observe/guard on the bonds/affirmations, and the most excellent/balanced bond/affirmation and stand to God humbly dutiful/obedient/devout. [2:238]
So/but if you are in danger/fear, so walking or riding, so if you became safe/secure, so mention/remember God, as He taught you what you were not knowing. [2:239]
"salawat" is the plural of "salat", and simply means "bonds/affirmations". It is used in chapter 9 also for "oath/bond", and seems to have a formalised oral expression connotation (e.g. this can be seen from its Classical Arabic meanings: petition, oration, eulogy, benediction, commendation, blessing, honour, magnifiy). So that is why it is mentioned in context to marriage vows/promises/bonds etc.
Of course, when one asks any believer, what is the most excellent/balanced bond? They will not hesitate, and say to God / God's system. 2:238 is giving a message of whilst one guards/observes the bonds, also bear in mind to guard/observe the most excellent bond and stand to God dutiful/obedient in this. All the previous verses/signs are about one's duty to God's commands. Thus, what is inseparable from this, is to remember and understand such commands, as laid out in The Quran, as God teaches us what we were not knowing. So there is a two-fold reason for bringing this into the context.
The use of "stand" implies stationary, i.e. in one place. It can also be used metaphorically to mean "stand firm or persist".
Hence, it then follows on with 2:239, referring to guarding/observing of the most excellent bond/affirmation/salat by way of the regular/timed salat/bond (which is also a duty/command), and this can be done on the move if in a state of fear/threat/danger. If you become secure, then remember God as He has taught you what you did not know. Note use of word "taught". God teaches us by His guidance, and in this context it is revelation, The Quran, which links back perfectly to the prior context.