Update a value in a store. Note: This maintains a single mutex lock for both get and set
lambda to update a given value of type T