Well before getting into the end of Hebrews 10, I would first ask you Icthus if you have read the middle of the chapter. Let's consider these verses first (since context is always important):
Hbr 10:14-17 For by one offering he hath perfected for ever them that are sanctified. [Whereof] the Holy Ghost also is a witness to us: for after that he had said before, This [is] the covenant that I will make with them after those days, saith the Lord, I will put my laws into their hearts, and in their minds will I write them; And their sins and iniquities will I remember no more.
The writer of Hebrews prefaces by saying that God will not remember the sins of those that are saved any longer. He has perfected them forever. He has written His laws into their hearts. These are some fairly strong words that you must deal with if you are to use the end of the chapter to contradict these words.
Now we get into the 2 verses before the verses in your OP:
Hbr 10:26,27 For if we sin wilfully after that we have received the knowledge of the truth, there remaineth no more sacrifice for sins, But a certain fearful looking for of judgment and fiery indignation, which shall devour the adversaries.
The writer has already told us that believers are purged from sin forever and have the laws of God written in their hearts- so when he speaks of these that have sinned willfully after receiving the knowledge of the truth, he is apparently talking about unbelievers. This is further hammered home by the use of the word 'adversaries' at the end of verse 27. so the preface to verses 28-31 is those that have a knowledge of the truth but have rejected it.
Hbr 10:28 He that despised Moses' law died without mercy under two or three witnesses:
This is referring to an unbeliever. Since God has written His law in a believer's heart (earlier in the chapter) the believer cannot despise the law of Moses.
Hbr 10:29 Of how much sorer punishment, suppose ye, shall he be thought worthy, who hath trodden under foot the Son of God, and hath counted the blood of the covenant, wherewith he was sanctified, an unholy thing, and hath done despite unto the Spirit of grace?
so the question is- does this word 'sanctified' refer to the sanctification of a believer or something else? Context of the entire chapter up to this point is speaking of an unbeliever, so it's not unfair to investigate the matter.
The key to this verse is located in another verse:
1Cr 11:29 For he that eateth and drinketh unworthily, eateth and drinketh damnation to himself, not discerning the Lord's body.
There are some that are sanctified to the church and are following after the pictures of baptism and the Lord's supper. They appear to be believers, but are inwardly apostate. They have a knowledge of the truth and are even 'religious' but do not truly accept Christ as savior. Matthew Henry speaks of this verse:
the blood of Christ, with which the covenant was purchased and sealed, and wherewith Christ himself was consecrated, or wherewith the apostate was sanctified, that is, baptized, visibly initiated into the new covenant by baptism, and admitted to the Lord’s supper. Observe, There is a kind of sanctification which persons may partake of and yet fall away: they may be distinguished by common gifts and graces, by an outward profession, by a form of godliness, a course of duties, and a set of privileges, and yet fall away finally. Men who have seemed before to have the blood of Christ in high esteem may come to account it an unholy thing, no better than the blood of a malefactor, though it was the world’s ransom, and every drop of it of infinite value.
Hbr 10:30 For we know him that hath said, Vengeance [belongeth] unto me, I will recompense, saith the Lord. And again, The Lord shall judge his people.
Don't get hung up on the word 'judge.' It is the Greek word 'krino' and it means 'to discern or seperate.' The writer isn't saying believers will be judged for sin, but that God will judge who are His. This makes a whole lot more sense in context of the whole passage.
Hbr 10:31 [It is] a fearful thing to fall into the hands of the living God.
Amen. and those that profess to be believers but inwardly are not shall experience this fear someday.