"Racism" does have a flexible meaning. I would normally take the belief that one's own race is favored by God to be the core essence of racism, but it may not quite match all definitions.
The term "race" itself seems to come from 16th-century French and Italian roots, so quite a modern notion.
In historical terms, it may be difficult to distinguish racism proper from neighbouring notions such as tribalism, nationalism, xenophobia, anti-Semitism etc. because in ancient times these would have been essentially overlapping most of the time. But the causes of racism that exist today must have existed in the past just the same when an alien group mixed with the local population. But even in those possibly very frequent cases, racism is likely to have gone unreported for lack of interest of the intellectuals of the time in the popular culture. It seems likely that the term "race" has been invented around 1600 not because racism appeared at this point in time but because the period was struggling to classify a world it was discovering through the first expeditions to other continents. Also, I don't think sexism suddenly appeared at some point in the 20th century either even though the absence of discussion of it before the 20th century is rather conspicuous.
EB