UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hbd8Gtk5G7wyTOCYUt0iHFxdT0IgTCtMsdcUbMFyagI=' 
WHERE 
  key_id = 'eb53cf85f0d247deaa06b107857a7bc4af8b4f483ffe0e9aa573b69e0d663f7a' 
  AND (
    token = 'hbd8Gtk5G7wyTOCYUt0iHFxdT0IgTCtMsdcUbMFyagI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030