memcached: add locking

Change-Id: I18d5358278e31fcff1cbd1c20b7be814052cae05
Co-Authored-By: Sahid Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>