Some updates to get mysql mutex class to work properly