UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'g/ShllEN4bCHXUpYQzs94wapNkHyaDP99ZpO4uf9VYE=' 
WHERE 
  key_id = '75f1fab4a7800f7318664de297996fd63dea4a4ab9cda544f9fe37acb2faa0ea' 
  AND (
    token = 'g/ShllEN4bCHXUpYQzs94wapNkHyaDP99ZpO4uf9VYE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038