UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GcDgaCZ6ae72MQwLmcrnGo4ZU9WDinpGCK5abml6aCQ=' 
WHERE 
  key_id = '976b302e1397f57cfa3b9dcce4bdb20efc789d663e5b71a28c2e73e63abbda03' 
  AND (
    token = 'GcDgaCZ6ae72MQwLmcrnGo4ZU9WDinpGCK5abml6aCQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046