UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3lCRl8wV/nb9hvv2arEze4oSz1ETymAOZd0In6chCGU=' 
WHERE 
  key_id = '07f786148f462384c1ae551662302beb053ae4a58f27d1f2aa2ef854e06a8c80' 
  AND (
    token = '3lCRl8wV/nb9hvv2arEze4oSz1ETymAOZd0In6chCGU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033