My friend was almost raped. But she stopped it by giving her consent
Do you think that counts as consent?
It's fine.
Sexual assault is damaging to a person and joking about it can trigger a person. Making light about it can be hurtful, just like you would be hurt if people made a joke about something that caused you pain.
It's a joke, what's the harm in it?
If someone is being pressured into sex acts against their will and they "consent" it is still assault. Coercion is not consent, and it really is not fine.