LOCK TABLES `site_global` WRITE, `site` WRITE;

SELECT id INTO @siteId FROM site limit 1;

INSERT INTO `site_global` (`site_id`, `label`, `json`, `data`)
VALUES
    (@siteId, 'bha_id', 0, '57');

UNLOCK TABLES;