Have a look in:
/core/includes/file.class.php
Search for:
// check token
You'll see:
// $tokenData = $db->getRow('SELECT id, user_id, ip_address, file_id, download_speed, max_threads, file_transfer FROM download_token WHERE file_id = ' . $db->escape($this->id) . ' AND ip_address=' ...