A widespread belief around the middle of the first century was that the parousia would happen in the lifetimes of those still alive.
For example, as Bart D. Ehrman points out in Forged, p106, Paul expected the second coming of Jesus imminently. This is made particularly clear in 1 Thessalonians 4:17, where he expected to be one of those present at the end: "Then we which are alive and remain shall be caught up together with them in the clouds, to meet the Lord in the air: and so shall we ever be with the Lord." In 1 Corinthians chapter 7, Paul is telling his followers that it is better not to make new arrangements such as marriage when time is so short, but that if a person must marry, then so be it.
Rhoads, Dewey and Michie, in Mark as Story, page 80, explain that the author of Mark's Gospel believed that the rule of God would be established here on earth when Jesus returned on clouds of glory during the lifetimes of the people to whom Jesus had preached (Mark 9:1: "And he said unto them, Verily I say unto you, That there be some of them that stand here, which shall not taste of death, till they have seen the kingdom of God come with power", Mark chapter 13).
1 Peter 1:7 contains a suggestion of the imminent return of Jesus, as does 1 Peter 4:7:
1 Peter 1:7: That the trial of your faith, being much more precious than of gold that perisheth, though it be tried with fire, might be found unto praise and honour and glory at the appearing of Jesus Christ:
1 Peter 4:7: But the end of all things is at hand: be ye therefore sober, and watch unto prayer.
In chapter 4, the author of First Peter is talking about the imminent return of Jesus, so we should place his concept of salvation in that context. 1 Peter 4:17,18 goes on:
17: For the time is come that judgment must begin at the house of God: and if it first begin at us, what shall the end be of them that obey not the gospel of God? 18: And if the righteous scarcely be saved, where shall the ungodly and the sinner appear?
Our author says that the righteous will be judged first ("begin at us"), and that their salvation (in the life to come) is not assured. This is a literal quotation, word for word, of the Septuagint (LXX) version of Proverbs 11:31. This is not original to 1 Peter, so the author did not consciously choose the words, and therefore we can not be too literal in reading meaning into his use of 'righteous' or 'saved'. However, I believe that it is intended here as a warning against sin, for those who want to be saved.