UPDATE `articles`
SET `availability`=?,
    `created_at`=?,
    `id`=?,
    `version`=`version` + 1,
    `updated_at`=?
WHERE `articles`.`deleted_at` IS NULL
  AND `articles`.`version` = ?
  AND `id` = ?