To me it's more or less: if you move countries with an intent to stay, then you're an immigrant. Otherwise, you're an expat. Of course an expat my become an immigrant if they decide to take roots in a place.
So expat/immigrant seems like a very social/economic background distinction.