UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/y2K/eqJ2Zx5pogyWo1pOyIjv4W7ihEPIQV5wrFMRog=' 
WHERE 
  key_id = '92011e2ec23c9bc472744e5a6022a8df3c06d58011070cd46b9536bec916b312' 
  AND (
    token = '/y2K/eqJ2Zx5pogyWo1pOyIjv4W7ihEPIQV5wrFMRog=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032