UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FafHHhKsNPs7xEMRVOwqmEsdh89RT5QUT3R/8g07Ir0=' 
WHERE 
  key_id = '453ddb5c34601eb1f64eeabf4a1e0042cb50d3376ebe3b2a69891e0fb208e7d8' 
  AND (
    token = 'FafHHhKsNPs7xEMRVOwqmEsdh89RT5QUT3R/8g07Ir0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035