UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WbmlsJQX6eioH8vi5M52HwKa+vq3+XPS/it7rQZGJpw=' 
WHERE 
  key_id = 'a73b8bef4d3bfddc6f733aa2ae894be1f5179632306c239fa8d5ff473646045f' 
  AND (
    token = 'WbmlsJQX6eioH8vi5M52HwKa+vq3+XPS/it7rQZGJpw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029