Puede hacer uso del between
de MySQL y limit
cláusula para esto:
$range = 5; // you'll be selecting around this range.
$min = $rank - $range;
$max = $rank + $range;
$limit = 10; // max number of results you want.
$query = "select * from table where rank between $min and $max limit $limit";