Try this:
For your single-accessory.php template:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
// excludes this post from 'Related posts' in the sidebar
$GLOBALS['current_id'] = $post->ID;
?>
For your sidebar or where you want to show related posts:
<?php
if (is_singular('accessory') ) :
global $post;
$categories = get_the_category();
$exclude = $GLOBALS['current_id'];
$args = array(
'post_type' => 'accessory',
'post__not_in' => array($exclude),
'posts_per_page' => -1
);
foreach ($categories as $category) :
$posts = get_posts($args);
if(count($posts) > 1) {
//do stuff
}
endforeach;
?>