The first two verses focused on praising God; these next two verses teach us what to avoid in order to live a life that is pleasing to Him and have more reasons to praise Him.
To explain this concept another way, the psalmist tells us not to put our trust in princes. These people were the best of men who were generous and kind. Although they were military leaders who functioned in various roles serving others, the people should not be dependent upon them for the "salvation" of their country. Such people may be blessed with leadership skills, but if such leaders are not putting their trust in God, eventually they will die off and all of their leadership skills will come to nothing.
In the New Testament, Paul teaches us to pray for our leaders (see Romans 13:1-3). It can also apply to the leaders at any organization as well as government leaders. When Paul made that statement, he was referring to the Roman leaders who were not pro-Christian. Although these individuals were non believers, the people in Paul's day were to pray for them. For us today, even if our political leaders are not believers, there is a God who rules over the world, and we must remember that He manipulates things based on His desires for the world.
Although there is a delicate balance with these thoughts, the main point is that as long as we are living, we must strive to obey our leaders when it does not conflict with obeying God ("We ought to obey God rather than men" Acts 5:29). However, we should not put our trust in them to give us the internal peace we desire because only God can give us that peace.