How do the proponents of the doctrine that salvation can't be lost usually explain Matthew 7:21-23? This question is about one particular kind of Christians (I believe most of such Christians are found among Protestants) - those who:

1) believe that a man receives salvation at his very first prayer to Christ;

2) believe that a man who has received salvation can never lose it;

How do these Christians explain Matthew 7:21-23? 

On one hand, the people mentioned there clearly prayed to Christ during their lifetime; on the other hand, the very last words spoken by the Lord ("I never knew you: depart from me, ye that work iniquity") may mean that they are either losing their salvation at this moment or have never been saved at all:


  Not every one that saith unto me, Lord, Lord, shall enter into the
  kingdom of heaven; but he that doeth the will of my Father which is in
  heaven.
  
  Many will say to me in that day, Lord, Lord, have we not prophesied in
  thy name? and in thy name have cast out devils? and in thy name done
  many wonderful works?
  
  And then will I profess unto them, I never knew you: depart from me,
  ye that work iniquity. (KJV)
There are several perceived difficulties with this passage.


Equating entering the kingdom with salvation.
Equating saying "Lord, Lord" with salvation.
Equating casting out devils as proof of salvation.


Let's address each one.


Paul wrote to the church saying that the immoral shall not inherit the kingdom of God (Galatians 5:19-21. So it is possible that the church (composed of saved people), can be saved and miss out on receiving glory in the coming kingdom. They will be excluded from honor in the kingdom and will not reign with Christ in it. This part of salvation can be lost without losing other aspects of our salvation. For instance, Romans 8:32-39 is emphatic that those who live according to the Spirit will never be "separated from the love of God." They will be in the new heavens and new earth, but not in the kingdom with honor. For more on this, see Paul N. Benware, The Believer's Payday.
Just calling Jesus "Lord" does not mean that one actually lives with the sense of yielding to Christ's authority in life and conduct. "Lord" may be a title more than a position of honor for some people. This is just common sense. 
Judas cast out devils and performed miracles with the other disciples when they went out two by two. Was he saved? Can one be used by God and still be a nominal Christian? Yes; God may use any instrument He wishes, even to borrow the tongue of a donkey as He did in the OT.