First get the category of the visible post, and then query with that.
$post_cat_ids = wp_get_object_terms( get_the_ID(), 'category', array('fields' => 'ids'));
Then on your query,
<?php
$my_query = new WP_Query( array(
'category__in' => $post_cat_ids,
'showposts' => 10
));
?>