Do you use Xcache or another such opcode cache?
This error happens if you use the 4.0.9 vault/core/model/datastore/xf.php with 4.0.10, which is possible to do when the opcode cache has not yet picked up the newly uploaded file. If you use any opcode cache other than PHP's built-in Zend Opcache, then it is your responsibility to reset that cache whenever you update PHP scripts on your server. Failure to do this has been known to result in cached files that do not match the actual files on your server, which can cause errors or worse, damage to the database. Usually restarting the related cache process, PHP, or the server will reset whatever opcode cache is active.