If you are using the Primary Key of the custom table as an identifier, this could be a problem because it could be different if you manually add content in both environments. I'd suggest adding some sort of code name for that record to store with your other queries or foreign key relationships.