Very close.
Sacraments can be given conditionally if the priest is unsure if the person is alive or not.
“If you are alive, by this holy Anointing…”
There is no conditional form for “if you are not persistent in grave sin, by this holy Anointing…”
This is a judgement call for the priest. He must ask himself: what is the possibility that the sick person does want the sacraments?
While the priest can validly administer the sacraments, the actual effects of them, the graces received, depend on the person’s internal dispositions. In other words, does the person want to be forgiven and absolved even though he cannot speak or make other indications? We hope that even the most persistent sinner actually does want forgiveness when faced with imminent death.
If the person is conscious and refuses the sacrament, or refused to turn away from the sin, then the priest cannot administer them.
So, unless it’s a truly extreme example of someone living in manifest grave sin, or some heresy, if the patient is unconscious, most priest will administer the sacraments, while basically thinking to themselves (and praying) that this person is in God’s hands, and if he’s repentant, he’s forgiven. If he isn’t, then I’ve just said some words that have no actual effect.