Update last_span in replace_token