Add mutex to mysql