De man locate
EXAMPLES
To search for a file named exactly NAME (not *NAME*), use
locate -b '\NAME'
Because \ is a globbing character, this disables the implicit replace‐
ment of NAME by *NAME*.
Portanto ...
locate -b '\xyz.c'