Ruff the diamond, cross to the ♥K, ruff dummy’s last diamond, cash the ♥A (it is unlikely that West had a singleton heart and didn’t lead it or East had a singleton heart and didn’t switch to it) and exit a heart.
If hearts are 3–3, you are in good shape. Win the club return, play the ♠K A and discard a club on the ♥10.
If East had a doubleton honor, dummy’s 10 is a temporary winner. West will probably lead a fourth heart to kill it, and after you overruff East, there are only three spades remaining. Chances are you have no spade loser after you overruff. East, with heart shortness, figures to have spade length.
If West started with the ♥Q J x x and continues with a third and fourth heart, ruff, cash the ♣A K, exit a club, and take the last three tricks with the ♠A x x facing the ♠K J 10.
Yes, if East started with a 3=2=5=3 pattern, he might discard two clubs on hearts and then ruff your second high club after you ruff the fourth round of hearts. Chances are that won’t happen. East’s club holding may appear too critical to discard, and if you do get the club ruffed, you might have lost a spade trick anyway, as East would have started with three spades.
If East started with the ♥Q J x x or ♥Q 9 x x (worst-case scenario) and plays a third and fourth heart, discard a club and hope you can work out the spade distribution after East shifts to a club.