How can I access block metadata from custom plugin instance?
Generate unique form ID based on context contains the answer you're looking for.

Short answer is, you have to make this unique id yourself. See the mentioned simplenews project and how I solved it there.

Keep in mind that block plugins are not only usable by core block entities, they can also be used by Page Manager/Panels, where you have many blocks in a single variant and even by projects like block_field, which allow to use block plugins on content entities. You must not rely on anything but your own configuration array.

I think I once opened a core issue about this, to introduce a method so that a unique ID can bet set on a block plugin, but I can't find it anymore, only another core issue (https://www.drupal.org/node/2405879) where I mentioned that I can't find that issue anymore :)