UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'G+jcOJRey02AHg+7+fRfMgefsji0nkik+JQJqrQMnuE=' 
WHERE 
  key_id = '6f98935545557108906e0e9aa850bdbff218cab0f170ee0ffb6c278a11116650' 
  AND (
    token = 'G+jcOJRey02AHg+7+fRfMgefsji0nkik+JQJqrQMnuE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043