If someone originally told you they were giving you $30K, but refused to accept your money when you tried to pay them back, wouldn't you assume that they didn't expect you to pay them back?
If there is one thing that you should never do in a family or a relationship, it's to lend somebody else money. That totally changes the relationship from mother and daughter or boyfriend and girlfriend to lender and borrower. If you owe your mom $10K, she's going to start to resent you if she sees you going on vacation instead of paying her back. A bank doesn't have emotions like that, so although it's not great to go into debt, at least you don't have to sit across from the bank during Thanksgiving dinner. Your relationship with your bank is purely transactional. Your relationship with your mom shouldn't be transactional at all.
If somebody in your family asks you for money, you should either give it to them as a gift or not give it at all. If you loan money to your cousin, you have to do it knowing it might ruin your relationship, and you might never get it back. If you gift the money, you accept that it's gone forever, and you won't get paid back. If you are in a financial position where giving the money would negatively affect your quality of life, then you're not able to give the money: plain and simple!
Even if you do everything right and give instead of loaning money, you might regret it in the long term. If you gave $4000 to your sister and you became estranged from her 5 years later, you might wish you had never given her that money. You might even have the instinct to call her and ask for it back, but that would be fruitless. You can't take a gift back, no matter how much you regret giving it. The likelihood of somebody giving money back to somebody they're estranged from is next to none. Not only that, but getting that money back is not going to make you feel as good as you think it's going to feel. It can't fix the wound of the estrangement.
Is it unethical to keep the cash gifts given to you by the partner that you broke up with? Does the answer depend on how much the cash gift was?