UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '19zxDzzFw37aLpXv3FCdtEZT/e5cQIoy5DWBCc1BuSI=' 
WHERE 
  key_id = 'e86f1e0d16668516f9d570ecd31409a930f8ace0ac2307f2de1b43a6c829ef81' 
  AND (
    token = '19zxDzzFw37aLpXv3FCdtEZT/e5cQIoy5DWBCc1BuSI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029