While in some cases it may be that the lock is not repairable due to age (replacements no longer made) or because of a fundamental issue with the locking mechanism itself, in most cases it can be repaired.
Sometimes the lock is not the issue. When the door settles it can cause the latch or deadbolt to not be centered on the latch plate so that it can't close properly. We have simple solutions to this too.