At the moment of death, there are two things that count: whatever we have done in our lives, and what state of mind we are in at that very moment. Even if we have accumulated a lot of negative karma, if we are able to make a real change of heart at the moment of death, it can decisively influence our future, and transform our karma, for the moment of death is an exceptionally powerful opportunity to purify karma.
Sogyal Rinpoche