I couldn't find a good excuse not even to myself, until I found out I'm aspie. Since then I listen to my gut and be honest
"They invited us to have lunch out."
"Well, go, I'll remain here."
"What?! You're invited too!"
"But I don't wanna go."
They come, see my face.
"Why don't you wanna go? Are you ill?"
"No, I just don't want to see people or be with people today."
I don't know if they see something in my face or it's just my bold sincerity, but it works