UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/zW+xpPM+vEMLcVtVhaYAS9YKp05igq68WCPI/gQNK0=' 
WHERE 
  key_id = 'c00f85d8c8625edcb3474085e0343202cd85eb3bf22c3b30dd53997d3ab13f70' 
  AND (
    token = '/zW+xpPM+vEMLcVtVhaYAS9YKp05igq68WCPI/gQNK0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029