Illustrative example
A tenant's lease contains a clause making them pay all of the landlord's costs whatever happens and whoever is at fault. They were handed it on a take-it-or-leave-it basis and told the apartment would go to someone else otherwise.
A court may refuse to enforce the lease, enforce the rest without the offending clause, or limit the clause so as to avoid an unconscionable result, and the middle course is the usual one. Unconscionability is assessed as at the time the lease was made, and subdivision 2 entitles the parties to present evidence of the clause's setting, purpose and effect. So it turns on the circumstances in which it was signed, not on how badly it has since worked out.
They replace it with a mutual clause under which the losing side pays the other's reasonable costs, which both are willing to sign.