How to add unique identifier to each submission?
You want to use hook_webform_submission_presave to record your special key. I would create a hidden textfield in the Webform that is optional so the value can be set by your PHP code upon submission.

For a basically full working example see Webform Issue #1964080.

To create your special value such as AB-001-12345 you just make a php function that creates a random string, or a string to your specifications:

function generate_special_submission_key() {
  $length = 10;
  $str = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length);
  return $str;
}