The entire verse is the Lord's promise to the overcomers. It will be fulfilled in the millennial kingdom after the Lord comes back. That a name is erased out of the book of life indicates that that name has already been written in the book of life. The book of life is a divine record of the names of those who partake of the blessings that God has prepared for them. The names of all the saints chosen by God and predestinated to partake of these blessings are written in this book (Luke 10:20). These blessings are in three stages:
1) in the church,
2) in the millennial kingdom,
3) in eternity. The blessings in the stage of the church, such as forgiveness, redemption, regeneration, eternal life, the divine nature, etc., are the initial portions. All God's chosen ones whose names are written in the book of life have a share in these initial portions to begin their spiritual life. If they cooperate with God's supplying grace, they will mature in life in the church age, and this earlier maturity in life will constitute a prize with which the Lord will reward them at His coming back. That prize will be the entrance into the millennial kingdom and participation in the divine blessings in that stage, such as the joy and rest of the Lord (Matt. 25:21, 23; Heb. 4:9-11), the reign over the nations (Rev. 2:26-27; 20:4, 6), etc., which God has prepared as an incentive for His chosen ones to go on with Him in the church age. However, many of His chosen ones, after receiving His forgiveness, redemption, eternal life, divine nature, etc., will not cooperate with His grace and will not go on with Him. Hence, they are unable to mature in life in the church age and thus will not be ready at the Lord's coming back to enter into the millennial kingdom and share in the divine blessings of that age as a prize. Therefore, during the millennial kingdom their names will be erased from the book of life. After being disciplined by the Lord and growing in life unto maturity during the millennial kingdom, they will share in the divine blessings in the stage of eternity, such as the eternal priesthood with God's eternal presence, the eternal kingship (Rev. 22:3-5), the New Jerusalem, the tree of life (Rev. 22:14), the water of life (Rev. 22:17), etc. At that time their names should again be written in the book of life. This means that all God's chosen ones whose names are written in the book of life and who have been brought into the participation of the divine blessings in the stage of the church "shall by no means perish forever," (John 10:28) that is, they shall by no means lose the divine blessings of eternity. But some, those who do not cooperate with the Lord in the church age, will be dispensationally disciplined by the Lord during the millennial kingdom and will miss the divine blessings in that stage.