The Lord knoweth how (oiden kurios). The actual apodosis of the long protasis begun in 2Pe 2:4. God can deliver his servants as shown by Noah and Lot and he will deliver you. The idiomatic use of oida and the infinitive (ruesthai present middle and see 2Pe 2:7) for knowing how as in Mat 7:11; Jam 4:17.
The godly (eusebeis). Old anarthrous adjective (from eu and sebomai, to worship), in N.T. only here and Act 10:2, Act 10:7 (by Peter). For temptation (peirasmou) see Jam 1:2, Jam 1:12; 1Pe 1:6.
To keep (tērein). Present active infinitive of tēreō after oiden.
Unrighteous (adikous). As in 1Pe 3:18.
Under punishment (kolazomenous). Present passive participle of kolazō, old verb (from kolos, lopped off), in N.T. only here and Act 4:21. Present tense emphasises continuity of the punishment. See kolasin aiōnion in Mat 25:46.