UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1/O1ebsKwho88qeMC8vhQsa/ctDQ9dDuZFsMQrUsYe0=' 
WHERE 
  key_id = '6b225485b02581bb25db06d1b3dd3275bb9dc3a811777be8168fb58f362683fe' 
  AND (
    token = '1/O1ebsKwho88qeMC8vhQsa/ctDQ9dDuZFsMQrUsYe0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00073