There isn’t really a difference, they’re two words for the same concept.
In practice, “index” is usually used in arrays like
local array = {"a", "b", "c"}
local index = 2
print(array[index])
whereas “key” is usually used in associative dictionaries like
local dict = {first = "a", second = "b", third = "c"}
local key = "second"
print(dict[key])
But they’re just names.