fix for ATDSUPPORT-194
move the mutex lock outside of the if statement as dicsussed in JIRA ticket ATDSUPPORT-194 https://its.cern.ch/jira/browse/ATDSUPPORT-194
move the mutex lock outside of the if statement as dicsussed in JIRA ticket ATDSUPPORT-194 https://its.cern.ch/jira/browse/ATDSUPPORT-194