When Should You Repair or Replace a Door Lock?

When Should You Repair or Replace a Door Lock?