UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UHolMK1pqq8upp3bQHm623aB2+bSjmaF//25tHdQjHc=' 
WHERE 
  key_id = '16daf0387059c57926b8c1448642f480828b0988b36ef924474f27fe11aae536' 
  AND (
    token = 'UHolMK1pqq8upp3bQHm623aB2+bSjmaF//25tHdQjHc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019