These are "genes" that don't have an official name. As explained in https://www.ncbi.nlm.nih.gov/books/NBK3840/#genefaq.Nomenclature:
Symbols beginning with LOC. When a published symbol is not available, and orthologs have not yet been determined, Gene will provide a symbol that is constructed as 'LOC' + the GeneID. This is not retained when a replacement symbol has been identified, although queries by the LOC term are still supported. In other words, a record with the symbol LOC12345 is equivalent to GeneID = 12345. So if the symbol changes, the record can still be retrieved on the web using LOC12345 as a query, or from any file using GeneID = 12345.
In other words, when a gene has no known function or homologs in other species, when all we know about it is that it is a locus that seems to be actively transcribed, then it gets the name of LOC
plus a numerical gene ID. So these genes, the LOCNNNN are essentially lesser known and studied genes. Some of them may graduate to a full gene name, others might not.
As for uniqueness, no absolutely not. GenBank gene IDs are unique, they don't imply homology. Only one gene can have a given ID. For example, gene ID 1 corresponds to human A1BG, alpha-1-B glycoprotein. The mouse homolog of human A1BG, mouse A1bg, alpha-1-B glycoprotein, has the gene ID 117586. The numerical value of the ID tells you nothing at all. It is just a unique identifier for a specific gene in a specific species.
Finally, a more general note, homology is rarely as straightforward as your question suggests you might think it is. Even actually homologous genes often have different functions with specific functions having been gained or lost in a given lineage. So it is very hard to know and never safe to assume that two homologous genes in different species "do the same thing".