There is a findAndModify() operation in MongoDB which could be used. CouchDB implicitly does a version comparison (provided on passes in the loaded revision).