I'd probably make lock_backend the class name to use rather so you don't have to come back here and remember to add another if/else block every time you make a new class.  Also means the values of lock_backend are more obvious IMHO since there is no obvious map between the string & class name.  And while doing that, I'd rename it to "lock_class". :)