public function update($hash = null, $data)
    {
        // If the hash is not received, get it from the request
        $hash = $hash?: $this->app->request->token();

        // Update the file in the tokens storage
        $token = $this->get($hash);
        $data = array_merge_recursive($token, $data);
        $stored = file_put_contents($this->path($hash), json_encode($data));

        // Return the data or false in case of failure
        return ($stored)? $data : false;
    }