<?php

if (config('vip.table')) {
    $free = array_keys(config('vip.types', []))[0];

    $conn->executeUpdate('update ' . config('vip.database') . '.dbo.' . config('vip.table') . ' set
        ' . config('vip.column_type') . ' = ' . $free . ',
        ' . config('vip.column_expire') . ' = GETDATE()
        where ' . config('vip.column_expire') . ' < GETDATE()
    ');
}